<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:ui="http://java.sun.com/jsf/facelets">
    <h:head>
        <title>Speed Dial</title>
    </h:head>
    <h:body>
        <ui:composition template="templates/main-template.xhtml">
                     
            <ui:define name="content">
                <h1 style="padding-left: 25px;">Üdvözöljük<h:outputText 
                        rendered="#{userManager.user != null}" value=" #{userManager.user.username}" />!</h1>
                <h:panelGroup rendered="#{userManager.user == null}">
                    <div class="lr-margin">
                    <h2>Bejelentkezés</h2>
                    <form method="post" action="j_security_check"> 
                        <h:panelGrid columns="2" cellpadding="2">

                            <h:outputLabel value="Felhasználóinév:" class="login-label"/>
                            <h:inputText id="j_username" class="login-input"/>

                            <h:outputLabel value="Jelszó:" class="login-label"/>
                            <h:inputSecret id="j_password" class="login-input"/>

                            <h:panelGroup />
                            <h:commandButton value="Login" style="width: 100%;" />

                        </h:panelGrid> 
                    </form>
                    <h4>Még nem vagy regisztrálva?</h4>
                    <h:link value="Regisztráció" outcome="regist.xhtml" />
                    </div>
                </h:panelGroup>
                <h:panelGroup rendered="#{userManager.user != null}" class="lr-margin">
                    <div class="lr-margin">
                        <h4>Tovább a SpeedDial-hoz</h4>
                        <h:link value="SpeedDial" outcome="speed-dial.xhtml" />
                        
                        <h:panelGroup>
                            <h4>Dialok exportálása</h4>
                            <h:link value="Exportálás" outcome="export.xhtml" />
                        </h:panelGroup>
                    
                        <h:panelGroup>
                            <h4>Tovább az Admin felületre</h4>
                            <h:link value="Admin felület" outcome="admin.xhtml" />
                        </h:panelGroup>
                    </div>
                </h:panelGroup>
            </ui:define>        
   
        </ui:composition>
    </h:body>
</html>

